<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app">
        {{arr}};{{arr.length}}
        <button @click="change">change</button>
    </div>
    <script src="./vue.js"></script>
    <script>
        let vm = new Vue({
            el:'#app',
            data:{
                arr:[1,2,3]
            },
            methods:{
                change(){
                    // this.arr[1] = 'b';
                    // this.arr.length = 2;
                    // this.arr.splice(1,1,'b');
                    this.arr.splice(0);
                }
            }
        })
    </script>
</body>
</html>